<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>商品信息修改</title>

    <%--    样式--%>
    <%@include file="/pages/common/plug_.jsp" %>
    <%--    样式--%>


    <style type="text/css">
        h1 {
            text-align: center;
            margin-top: 200px;
        }

        h1 a {
            color: red;
        }

        input {
            text-align: center;
        }
    </style>
</head>
<body>
<!-- header -->
<%@include file="/pages/common/success_head.jsp"%>
<!-- header -->

<div id="header">
    <span class="wel_word">编辑商品</span>
    <%@include file="/pages/common/navigation_bar.jsp" %>
</div>

<div id="main">
    <form action="${pageScope.Path}/managers/commodityServlet" method="post">
<%--        <input type="hidden" name="action" id="action" value="${param.method}">--%>
<%--        <input type="hidden" name="action" id="action" value="${empty requestScope.commodity?"add":"update"}">--%>
        <input type="hidden" name="action" id="action" value="${empty param.id?"add":"update"}">
        <input type="hidden" name="id" id="id" value="${requestScope.commodity.id}">
        <input type="hidden" name="pageNo" id="pageNo" value="${param.pageNo}">
        <table>
            <tr>
                <td>名称</td>
                <td>价格</td>
                <td>作者</td>
                <td>销量</td>
                <td>库存</td>
                <td colspan="2">操作</td>
            </tr>
            <tr>
                <td><input name="name" type="text" value="${requestScope.commodity.name}"/></td>
                <td><input name="price" type="text" value="${requestScope.commodity.price}"/></td>
                <td><input name="author" type="text" value="${requestScope.commodity.author}"/></td>
                <td><input name="sales" type="text" value="${requestScope.commodity.sales}"/></td>
                <td><input name="stock" type="text" value="${requestScope.commodity.stock}"/></td>
                <td><input type="submit" value="提交"/></td>
            </tr>
        </table>
    </form>


</div>


<!--footer-->
<%@include file="/pages/common/common_footer.jsp" %>
<!--footer-->


</body>
</html>